﻿using System;
using Besture.Bll;
using Besture.Common;
using Besture.Model;


namespace Besture.UI.Admin.Content
{
    public partial class ReplayMessage : BasePage
    {
        public string _ID = StringHelper.Query("ID");

        public WebMessageModel WebMessageModel = new WebMessageModel();
        /// <summary>
        /// 初始化页面
        /// </summary>
        protected override void InitialLoad()
        {
            WebMessageModel = new WebMessageDac().GetModel(Convert.ToInt32(_ID));
            txtReply.Text = WebMessageModel.Reply;
        }

        /// <summary>
        /// 回发
        /// </summary>
        protected override void PostBackLoad()
        {
        }

        protected void btnSubmit_Click(object o, EventArgs e)
        {
            WebMessageDac webMessageDac = new WebMessageDac();
            WebMessageModel model = webMessageDac.GetModel(Convert.ToInt32(_ID));
            model.Reply = txtReply.Text;
            model.ReplyType = 1;
            model.UpdateTime = DateTime.Now;
            webMessageDac.Update(model);
        }
    }
}